.class final Lcom/ninesky/browser/view/av;
.super Landroid/os/AsyncTask;


# instance fields
.field private synthetic a:Lcom/ninesky/browser/view/bg;


# direct methods
.method constructor <init>(Lcom/ninesky/browser/view/bg;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/view/av;->a:Lcom/ninesky/browser/view/bg;

    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    return-void
.end method

.method private varargs a()Ljava/util/List;
    .locals 11

    const/4 v10, 0x6

    const/4 v8, 0x0

    const/4 v9, 0x0

    new-instance v6, Ljava/util/ArrayList;

    invoke-direct {v6}, Ljava/util/ArrayList;-><init>()V

    const-string v3, "visits != 0"

    const-string v5, "visits DESC"

    iget-object v0, p0, Lcom/ninesky/browser/view/av;->a:Lcom/ninesky/browser/view/bg;

    invoke-static {v0}, Lcom/ninesky/browser/view/bg;->a(Lcom/ninesky/browser/view/bg;)Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    :try_start_0
    sget-object v1, Lcom/ninesky/browser/provider/e;->a:Landroid/net/Uri;

    sget-object v2, Lcom/ninesky/browser/provider/e;->b:[Ljava/lang/String;

    const/4 v4, 0x0

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v7

    :try_start_1
    invoke-interface {v7}, Landroid/database/Cursor;->moveToFirst()Z

    :goto_0
    invoke-interface {v7}, Landroid/database/Cursor;->isAfterLast()Z
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    move-result v0

    if-eqz v0, :cond_2

    :cond_0
    if-eqz v7, :cond_1

    invoke-interface {v7}, Landroid/database/Cursor;->close()V

    :cond_1
    :goto_1
    return-object v6

    :cond_2
    const/16 v0, 0xa

    :try_start_2
    invoke-interface {v7, v0}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    if-nez v0, :cond_5

    const/4 v0, 0x5

    invoke-interface {v7, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v1

    const/4 v0, 0x1

    invoke-interface {v7, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v2

    const/4 v0, 0x6

    invoke-interface {v7, v0}, Landroid/database/Cursor;->getBlob(I)[B

    move-result-object v0

    if-eqz v0, :cond_7

    const/4 v3, 0x0

    array-length v4, v0

    invoke-static {v0, v3, v4}, Landroid/graphics/BitmapFactory;->decodeByteArray([BII)Landroid/graphics/Bitmap;

    move-result-object v0

    :goto_2
    if-eqz v0, :cond_3

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->isRecycled()Z

    move-result v3

    if-eqz v3, :cond_6

    :cond_3
    iget-object v0, p0, Lcom/ninesky/browser/view/av;->a:Lcom/ninesky/browser/view/bg;

    invoke-static {v0}, Lcom/ninesky/browser/view/bg;->b(Lcom/ninesky/browser/view/bg;)Landroid/graphics/Bitmap;

    move-result-object v0

    move-object v4, v0

    :goto_3
    const/16 v0, 0xc

    invoke-interface {v7, v0}, Landroid/database/Cursor;->getInt(I)I

    move-result v5

    new-instance v0, Lcom/ninesky/browser/provider/b;

    const/4 v3, 0x0

    invoke-direct/range {v0 .. v5}, Lcom/ninesky/browser/provider/b;-><init>(Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;I)V

    invoke-interface {v6, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    add-int/lit8 v0, v8, 0x1

    if-ge v0, v10, :cond_0

    :goto_4
    invoke-interface {v7}, Landroid/database/Cursor;->moveToNext()Z
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_1
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    move v8, v0

    goto :goto_0

    :catch_0
    move-exception v0

    move-object v0, v9

    :goto_5
    if-eqz v0, :cond_1

    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    goto :goto_1

    :catchall_0
    move-exception v0

    move-object v1, v9

    :goto_6
    if-eqz v1, :cond_4

    invoke-interface {v1}, Landroid/database/Cursor;->close()V

    :cond_4
    throw v0

    :catchall_1
    move-exception v0

    move-object v1, v7

    goto :goto_6

    :catch_1
    move-exception v0

    move-object v0, v7

    goto :goto_5

    :cond_5
    move v0, v8

    goto :goto_4

    :cond_6
    move-object v4, v0

    goto :goto_3

    :cond_7
    move-object v0, v9

    goto :goto_2
.end method


# virtual methods
.method public final bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1

    invoke-direct {p0}, Lcom/ninesky/browser/view/av;->a()Ljava/util/List;

    move-result-object v0

    return-object v0
.end method

.method protected final bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 1

    check-cast p1, Ljava/util/List;

    iget-object v0, p0, Lcom/ninesky/browser/view/av;->a:Lcom/ninesky/browser/view/bg;

    invoke-static {v0, p1}, Lcom/ninesky/browser/view/bg;->a(Lcom/ninesky/browser/view/bg;Ljava/util/List;)V

    iget-object v0, p0, Lcom/ninesky/browser/view/av;->a:Lcom/ninesky/browser/view/bg;

    invoke-virtual {v0}, Lcom/ninesky/browser/view/bg;->notifyDataSetChanged()V

    return-void
.end method
